<?php
require_once(TXTSQL_CORE_PATH.'/txtSQL.class.php');

global $sql;
$sql = new txtSQL(TXTSQL_CORE_PATH.'/data');
// 默认时是 $sql->connect($username, $password);
$sql->connect('root', '') or die('Error occurred while connecting, txtSQL said: '.$sql->get_last_error());

$sql->selectdb('kw') or die('this DB could not be selected, txtSQL said: '.$sql->get_last_error());
?>